home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 4 / Mac Giga-ROM 4.0 - 1993.toast / FILES / HYP / H-I / HyperScrap.cpt / HyperScrap / card_4950.txt < prev    next >
Text File  |  1989-01-09  |  5KB  |  223 lines

  1. -- card: 4950 from stack: in
  2. -- bmap block id: 5289
  3. -- flags: 4000
  4. -- background id: 2715
  5. -- name: Text
  6. ----- HyperTalk script -----
  7. function getField clickPoint
  8. repeat with x = 1 to the number of card fields
  9.   if clickPoint is within the rect of card field x then
  10.     return the short name of card field x
  11.   end if
  12. end repeat
  13. end getField
  14.  
  15. on closeCard
  16.   hide card button "Paste"
  17. end closeCard
  18.  
  19. on openCard
  20.   choose browse tool
  21. end openCard
  22.  
  23.  
  24.  
  25. -- part 1 (field)
  26. -- low flags: 00
  27. -- high flags: 0007
  28. -- rect: left=16 top=40 right=106 bottom=180
  29. -- title width / last selected line: 0
  30. -- icon id / first selected line: 0 / 0
  31. -- text alignment: 0
  32. -- font id: 3
  33. -- text size: 12
  34. -- style flags: 0
  35. -- line height: 16
  36. -- part name: text1
  37.  
  38.  
  39. -- part 2 (field)
  40. -- low flags: 00
  41. -- high flags: 0007
  42. -- rect: left=276 top=30 right=95 bottom=485
  43. -- title width / last selected line: 0
  44. -- icon id / first selected line: 0 / 0
  45. -- text alignment: 0
  46. -- font id: 3
  47. -- text size: 12
  48. -- style flags: 0
  49. -- line height: 16
  50. -- part name: text5
  51.  
  52.  
  53. -- part 3 (field)
  54. -- low flags: 00
  55. -- high flags: 0007
  56. -- rect: left=16 top=108 right=173 bottom=180
  57. -- title width / last selected line: 0
  58. -- icon id / first selected line: 0 / 0
  59. -- text alignment: 0
  60. -- font id: 3
  61. -- text size: 12
  62. -- style flags: 0
  63. -- line height: 16
  64. -- part name: text2
  65.  
  66.  
  67. -- part 4 (field)
  68. -- low flags: 00
  69. -- high flags: 0007
  70. -- rect: left=16 top=177 right=242 bottom=180
  71. -- title width / last selected line: 0
  72. -- icon id / first selected line: 0 / 0
  73. -- text alignment: 0
  74. -- font id: 3
  75. -- text size: 12
  76. -- style flags: 0
  77. -- line height: 16
  78. -- part name: text3
  79.  
  80.  
  81. -- part 5 (field)
  82. -- low flags: 00
  83. -- high flags: 0007
  84. -- rect: left=16 top=247 right=312 bottom=180
  85. -- title width / last selected line: 0
  86. -- icon id / first selected line: 0 / 0
  87. -- text alignment: 0
  88. -- font id: 3
  89. -- text size: 12
  90. -- style flags: 0
  91. -- line height: 16
  92. -- part name: text4
  93.  
  94.  
  95. -- part 7 (field)
  96. -- low flags: 00
  97. -- high flags: 0007
  98. -- rect: left=276 top=97 right=163 bottom=485
  99. -- title width / last selected line: 0
  100. -- icon id / first selected line: 0 / 0
  101. -- text alignment: 0
  102. -- font id: 3
  103. -- text size: 12
  104. -- style flags: 0
  105. -- line height: 16
  106. -- part name: text6
  107.  
  108.  
  109. -- part 8 (field)
  110. -- low flags: 00
  111. -- high flags: 0007
  112. -- rect: left=276 top=166 right=232 bottom=485
  113. -- title width / last selected line: 0
  114. -- icon id / first selected line: 0 / 0
  115. -- text alignment: 0
  116. -- font id: 3
  117. -- text size: 12
  118. -- style flags: 0
  119. -- line height: 16
  120. -- part name: text7
  121.  
  122.  
  123. -- part 10 (field)
  124. -- low flags: 00
  125. -- high flags: 0007
  126. -- rect: left=190 top=65 right=289 bottom=269
  127. -- title width / last selected line: 0
  128. -- icon id / first selected line: 0 / 0
  129. -- text alignment: 0
  130. -- font id: 3
  131. -- text size: 12
  132. -- style flags: 0
  133. -- line height: 16
  134. -- part name: text9
  135.  
  136.  
  137. -- part 11 (field)
  138. -- low flags: 00
  139. -- high flags: 0007
  140. -- rect: left=276 top=235 right=301 bottom=485
  141. -- title width / last selected line: 0
  142. -- icon id / first selected line: 0 / 0
  143. -- text alignment: 0
  144. -- font id: 3
  145. -- text size: 12
  146. -- style flags: 0
  147. -- line height: 16
  148. -- part name: text8
  149.  
  150.  
  151. -- part 14 (button)
  152. -- low flags: 00
  153. -- high flags: A000
  154. -- rect: left=201 top=306 right=321 bottom=260
  155. -- title width / last selected line: 0
  156. -- icon id / first selected line: 0 / 0
  157. -- text alignment: 1
  158. -- font id: 0
  159. -- text size: 12
  160. -- style flags: 0
  161. -- line height: 16
  162. -- part name: Clear!
  163. ----- HyperTalk script -----
  164. on mouseUp
  165.   answer "Clear all card fields?" with "Yes" or "Cancel"
  166.   if it is "Cancel" then exit mouseUp
  167.   repeat with x = 1 to the number of card fields
  168.     put empty into card field x
  169.   end repeat
  170. end mouseUp
  171.  
  172.  
  173.  
  174. -- part 18 (button)
  175. -- low flags: 80
  176. -- high flags: 0000
  177. -- rect: left=0 top=12 right=303 bottom=490
  178. -- title width / last selected line: 0
  179. -- icon id / first selected line: 0 / 0
  180. -- text alignment: 1
  181. -- font id: 0
  182. -- text size: 12
  183. -- style flags: 0
  184. -- line height: 16
  185. -- part name: Paste
  186. ----- HyperTalk script -----
  187. on mouseUp
  188.   put empty into fieldName
  189.   put getField(the clickloc) into fieldName
  190.   if card field fieldName is empty then exit mouseUp
  191.   put the number of lines in card field fieldName into x
  192.   select line 1 to x of card field fieldName
  193.   doMenu "Copy Text"
  194.   hide me
  195.   pop card
  196. end mouseUp
  197.  
  198.  
  199.  
  200. -- part 20 (button)
  201. -- low flags: 00
  202. -- high flags: 0000
  203. -- rect: left=0 top=292 right=317 bottom=188
  204. -- title width / last selected line: 0
  205. -- icon id / first selected line: 0 / 0
  206. -- text alignment: 1
  207. -- font id: 0
  208. -- text size: 12
  209. -- style flags: 0
  210. -- line height: 16
  211. -- part name: Paste
  212. ----- HyperTalk script -----
  213. on mouseUp
  214.   put empty into fieldName
  215.   put getField(the clickloc) into fieldName
  216.   put card field fieldName
  217.   put the number of lines in card field fieldName into x
  218.   select line 1 to x of card field fieldName
  219.   doMenu "Copy Text"
  220.   pop card
  221. end mouseUp
  222.  
  223.